<script type="text/javascript">
	
function minNumberInRotateArray(rotateArray)
{
    let left = 0, right = rotateArray.length-1;
    // debugger
    
    while(left<=right) {
        let mid = (left+right)>>1;
        if(rotateArray[mid] > rotateArray[right]){
            left = mid+1;
        } else if(rotateArray[mid] < rotateArray[right]){
            right = mid;
        } else {
            return rotateArray[mid]
        }
    }
}
const test = [1,2]
const res = minNumberInRotateArray(test)
console.log(res)

</script>